#import "POIAddressAnnotation.h"

/**
 * A POIAddressAnnotation is a single point of interest represented 
 * as a map annotation for an MKMapView. 
 * 
 * @author      Justin Hollander
 * @version     2.1.6
 * @since       2.1.6
 * @see         AddressAnnotation
 */
@implementation POIAddressAnnotation

@synthesize poi;

/**
 * Create a new point of interest annotation.
 *
 * @param coord     the coordinates of the point of interest
 * @param title     the title of the annotation
 * @param subtitle  the subtitle of the annotation
 * @param type      the type of annotation
 * @param thePoi    the point of interest information
 * @return          a newly allocated and initialized point of interest annotation
 */
+ (POIAddressAnnotation*)mapAnnotationWithCoordinate:(CLLocationCoordinate2D)coord 
											andTitle:(NSString*)title 
										 andSubtitle:(NSString*)subtitle 
											 andType:(AnnotationType)type 
											  andPOI:(PointOfInterest*)thePoi {
	return [[self alloc] initWithCoordinate:coord 
								   andTitle:title 
								andSubtitle:subtitle 
									andType:type 
									 andPOI:thePoi];
}

/**
 * Initialize the point of interest annotation.
 *
 * @param coord     the coordinates of the point of interest
 * @param title     the title of the annotation
 * @param subtitle  the subtitle of the annotation
 * @param type      the type of annotation
 * @param thePoi    the point of interest information
 * @return          the initialized point of interest annotation
 */
- (id)initWithCoordinate:(CLLocationCoordinate2D)coord 
				andTitle:(NSString*)title 
			 andSubtitle:(NSString*)subtitle 
				 andType:(AnnotationType)type
				  andPOI:(PointOfInterest*)thePoi {
	if (self = [super initWithCoordinate:coord 
								andTitle:title 
							 andSubtitle:subtitle 
								 andType:type]) {
		self.poi = thePoi;
	}
	
    return self;
}

@end
